#ifndef SLEEPER_H
#define SLEEPER_H

class Sleeper : public QThread
{
public:
    static void nsec(unsigned long s) {
        if(s>999)
            usleep(s/1000);
        else
            usleep(1);
    }
    static void usec(unsigned long s) {
        if(s>0) usleep(s);
    }
    static void msec(unsigned long s) {
        if(s>0) msleep(s);
    }
};

#endif // SLEEPER_H
